perm filename L2[F8,ALS]1 blob
sn#310380 filedate 1977-10-20 generic text, type T, neo UTF8
1F8X V03 PAGE 1
1 *CHECKERS as of October 20 1977. EQU's
2 * S2 section
3 *Resident package addresses
4 JOYT EQU H'0C00'
5 LINE EQU H'0FDF'
6 SHCB EQU H'0FE2'
7 INPF EQU H'0FE3'
8 WTLN EQU H'0FE5'
9 TXC EQU H'0FE8'
10 CMRG EQU H'0FEA'
11 DBNC EQU H'0FEB'
12 UPI EQU H'0FFA'
13 JOYI EQU H'21AD'
14 IJS EQU H'22DB'
15 SHL EQU H'27C6'
16 SHR EQU H'27D3'
17 PUSH EQU H'40A9'
18 POPS EQU H'40BC'
19 SPS EQU H'40D0'
20 WDG EQU H'4105'
21 WAUD EQU H'41C8'
22 WAU1 EQU H'41CC'
23 CDS EQU H'41D5'
24 WMS EQU H'4205'
25 UDAT EQU H'424D'
26 TRAN EQU H'43CD'
27 FCS EQU H'43D6'
28 WAIT EQU H'4501'
29 TIR EQU H'45DB'
30 CLER EQU H'4762'
31 *Misc. constants
32 TCMD EQU H'44'
33 BCMD EQU H'6D'
34 TCOL EQU H'80' TEXT COLOR
35 ULIN EQU H'F5'
36 COM EQU H'8F7'
37 *
38 *RAM assignments
39 PLY0 EQU H'0C20' Place for player's ply depth choice
40 COL0 EQU H'0C21' Place for color choice(next after P
41 SELX EQU H'0C22' SELE exit (0 norm, 1 M's 1st, -1 P'
42 XPOS EQU H'0C23' XPOSITION(CURSOR)
43 YPOS EQU H'0C26' YPOSITION(CURSOR)
44 BFLG EQU H'0C27'
45 BLNF EQU H'0C28' Blink flag
46 XBLN EQU H'0C29' X value to blink
47 YBLN EQU H'0C2A' Y value to blink
48 BCNT EQU H'0C2B' Counter used in OKMV
49 BKMV EQU H'0C2C' Data to index book moves
50 OBJ0 EQU H'0C30' Board 1, thru H'0E0F'
51 TREE EQU H'0E10' Tree data, thru H'0EFF', Player's b
52 TRE2 EQU H'0E20' Machine's first board here
53 TRE3 EQU H'0E30' PLY 1 location
54 HSAV EQU H'0E59' H save location
55 PLMD EQU H'0E5B' Used for temp store of player's mov
56 PLMV EQU H'0ED0' Overlay region used for player's mo
57 PLMF EQU H'0EE0' and move numbers
58 MOBS EQU H'0F00' Mobility and DJ flags (14 bytes)
59 OBJ1 EQU H'0F10' Board 2, thru H'0FAF'
60 *
61 *Scratch pad assignments
62 TEMP EQU H'8'
63 J EQU H'9'
64 HU EQU H'A'
65 HL EQU H'B'
66 PLOC EQU O'3' LISU value for ACTIVE and PASSIVE
67 KLOC EQU O'4' LISU value for KING's and special d
68 ELOC EQU O'5' LISU value for EMPTY's area
69 ISA EQU O'30' ISAR value for active area
70 ISP EQU O'34' ISAR value for passive
71 ISK EQU O'40' ISAR value for kings
72 ISE0 EQU O'50' ISAR value for guard byte
73 ISE EQU O'51' ISAR value foempty (with offset)
74 *Mimimum ply depths
75 PLYT EQU H'FE' Ply depth for Robot Tom (stored as
76 PLYD EQU H'FD' Ply depth for Robot Dick
77 PLYH EQU H'FC' Ply depth for Robot Harry
78 *SPECIAL CONSTANTS
79 X EQU H'1'
80 Y EQU H'2'
81 VX EQU H'3'
82 VY EQU H'4'
83 CHT EQU H'3' CURSOR HEIGHT
84 YTST EQU H'9'
85 XZOZ EQU H'34'
86 MAXY EQU H'4D' MAX Y COORD (=H'4F'-CHT)
87 *Linkage locations
88 PMOV EQU H'1100'
89 WMC EQU H'1200'
90 BORD EQU H'1300'
91 ORG H'1900' SELE
92 *-*-*-
93 1900 63 SELE LISU PLOC
94 1901 68 LISL 0
95 1902 10 LR DC,H
96 1903 7C LIS H'C' To get MOVE byte
97 1904 8E ADC
98 1905 16 LM
99 1906 50 LR 0,A Save it temporarily
100 1907 F0 NS 0 To set status byte
101 1908 94 04 BNZ SEL3
102 190A 29 1C 0F JMP NEXT To get next MOVE byte
103 190D 20 FF SEL3 LI H'FF'
104 190F 8E ADC Get back to move byte
105 1910 40 LR A,0
106 1911 24 FF AI H'FF' Really subtracting 1
107 1913 F0 NS 0 Remove right-most on-bit
108 1914 17 ST Put remaining bits back (and index
109 1915 E0 XS 0 This gets the extracted bit
110 1916 56 LR 6,A Save it in 6
111 *-*- A record of the serial number of this move should be kept for
112 *-*- and put with the resulting board, for use in identifying path
113 1917 16 LM Now get the byte designation
114 1918 55 SEL4 LR 5,A
115 1919 12 SR 1
116 191A 12 SR 1
117 191B 21 03 NI H'3' Separate the byte indicator part
118 191D 54 LR 4,A Save it in 4
119 191E 45 LR A,5
120 191F 21 13 NI H'13' Separate the JUMP bit and the dire
121 1921 55 LR 5,A Save them in 5
122 1922 20 18 DELE LI ISA Process Active and Kings for sourc
123 1924 C4 AS 4 Add byte #
124 1925 0B LR IS,A Get to initial byte
125 1926 4C LR A,S
126 1927 53 LR 3,A
127 1928 E6 XS 6 Delete moving piece
128 1929 5C LR S,A from byte
129 192A 64 LISU KLOC To get to corresponding KING byte
130 192B 4C LR A,S
131 192C F6 NS 6 Was the piece a king?
132 192D 84 04 BZ DEL2
133 192F EC XS S If it was delete king bit
134 1930 5C LR S,A
135 1931 77 LIS H'7' Non-zero in 2 for king
136 1932 63 DEL2 LISU PLOC
137 1933 52 LR 2,A
138 *Now locate captured piece if jump or find destination in normal m
139 1934 46 LR A,6 Recall MOVE bit
140 1935 14 SR 4
141 1936 84 12 BZ INRH Bit was in right half of byte
142 1938 53 INLH LR 3,A Save partially shifted MOVE bit
143 1939 45 LR A,5 Get direction
144 193A 21 01 NI H'1' To test right-most bit
145 193C 84 04 BZ INL2 RF or LB move where 4 shift is cor
146 193E 43 LR A,3
147 193F 12 SR 1 LF and LB require an additional sh
148 1940 53 LR 3,A
149 1941 45 INL2 LR A,5 Now test for fore or aft
150 1942 21 02 NI H'2'
151 1944 84 15 BZ BOTH Forward move, no byte shift needed
152 1946 4E LR A,D Only to decrement ISAR
153 1947 90 12 INL3 BR BOTH
154 *
155 1949 46 INRH LR A,6 Get MOVE bit again
156 194A 15 SL 4 Left shift if in right half
157 194B 53 LR 3,A Save partially shifted MOVE bit
158 194C 45 LR A,5 Get direction
159 194D 21 01 NI H'1'
160 194F 94 04 BNZ INR2 LF or RB wwhere 4 shift is correct
161 1951 43 LR A,3
162 1952 13 SL 1 RF and RB require an additional sh
163 1953 53 LR 3,A
**OPERATOR SYNTAX LINE # 164
164
165 1954 45 INR2 LR A,5 Now test fore and aft
166 1955 21 02 NI H'2'
167 1957 94 02 BNZ BOTH
168 1959 4D LR A,I Only to increment ISAR
169 *Now we are ready to decide if jump or not
170 195A 70 BOTH CLR
171 195B 50 LR 0,A Used temporarily to accumulate pie
172 195C 45 LR A,5 Now is this a jump or a normal mov
173 195D 14 SR 4
174 195E 94 04 BNZ BOT1
175 1960 29 1A 24 JMP NORM It's a normal move
176 1963 29 19 66 BOT1 JMP JUMP
177 * JUMP
178 *
179 1966 4C JUMP LR A,S Get King Byte corresponding to cap
180 1967 F3 NS 3 Was piece a king?
181 1968 84 06 BZ JUM1 No
182 196A E3 XS 3 Delete it
183 196B 5C LR S,A And replace byte
184 196C 40 LR A,0
185 196D 1F INC Count 1 extra for king
186 196E 50 LR 0,A
187 196F 72 JUM1 LIS H'2'
188 1970 C0 AS 0 Count 2 for piece capture
189 1971 50 LR 0,A
190 1972 63 LISU PLOC Get back to right buffer for ACTI
191 1973 0A LR A,IS
192 1974 24 04 AI 4 Increment to PASSIVE byte
193 1976 0B LR IS,A
194 1977 4C LR A,S Get appropiate PASSIVE byte
195 1978 E3 XS 3 Delete capture
196 1979 5C LR S,A And return byte
**OPERATOR SYNTAX LINE # 197
197
198 197A 63 LISU PLOC Back to moved-from location
199 197B 68 LISL 0
200 197C 0A LR A,IS
201 197D C4 AS 4 Byte number is in 4
202 197E 0B LR IS,A
203 197F 45 LR A,5 Get direction
204 1980 21 01 NI H'1' Test for right or left
205 1982 84 05 BZ JUM2
206 1984 46 LR A,6 It's to the left
207 1985 12 SR 1 Left moves involve a right shift o
208 1986 90 03 BR JUM3
209 1988 46 JUM2 LR A,6 It's to the right
210 1989 13 SL 1 Right moves involve a left shift o
211 198A 53 JUM3 LR 3,A Save displaced bit in 3
212 198B 45 LR A,5
213 198C 21 02 NI H'2' Test for fore or aft
214 198E 84 10 BZ JUM4 Fore move
215 1990 4E LR A,D Decrement ISAR (destination always
216 1991 44 LR A,4
217 1992 24 FF AI H'FF' Correct to destination byte number
218 1994 42 LR A,2 Was the piece a king?
219 1995 F2 NS 2
220 1996 94 1B BNZ JUM6 Yes, so not necessary to test for
221 1998 0A LR A,IS Backward non-king must be white
222 1999 25 18 CI O'30' Is this WHITE's king row
223 199B 94 1D BNZ JUM7 No, so there may still be a double
224 199D 90 0F BR JUM5 Promotion indicated, so no double
225 199F 4D JUM4 LR A,I Increment ISAR
226 19A0 44 LR A,4
227 19A1 24 01 AI H'1' Correct to destination byte number
228 19A3 54 LR 4,A We'll need this for continuation
229 19A4 42 LR A,2 Was the piece a king?
230 19A5 F2 NS 2
231 19A6 94 0B BNZ JUM6 Yes, so not necessary to test for
232 19A8 0A LR A,IS Forward non-king must be black
233 19A9 25 1B CI O'33' Is this BLACK's king row
234 19AB 94 0D BNZ JUM7 No, so there may still be a double
235 *Promotion indicated, do it and set 2 to flag bypass of double jum
236 19AD 71 JUM5 LIS H'1' Non-zero (but not 7) for promotion
237 19AE 52 LR 2,A It is so promote piece
238 19AF 40 LR A,0
239 19B0 1F INC Add 1 to debit account
240 19B1 50 LR 0,A
241 19B2 4C JUM6 LR A,S Now get right byte
242 19B3 C3 AS 3 Insert piece
243 19B4 5C LR S,A
244 19B5 0A LR A,IS Prepare to deposit king
245 19B6 24 07 AI 7 Go to correct king byte
246 19B8 0B LR IS,A
247 19B9 6C JUM7 LISL 4 Get to piece debit position
248 19BA 4C LR A,S
249 19BB 14 SR 4 Note that right part is zero'ed
250 19BC 12 SR 1
251 19BD C0 AS 0
252 19BE 25 07 CI H'7' Limit size to 7
253 19C0 81 03 BP JU7M
254 19C2 20 07 LI H'7'
255 19C4 15 JU7M SL 4
256 19C5 13 SL 1
257 19C6 5C LR S,A
258 19C7 42 LR A,2
259 19C8 25 01 CI H'1' Was it by promotion?
260 19CA 84 22 BZ JUM9 It was, so no double jump prepare
261 *Now we must anticipate a forked double jump
262 *See the detailed explanation of multiple jumps on page 3.
263 19CC 10 LR DC,H Do not advance H yet
264 19CD 20 20 LI H'20' Copy data two blocks forward
265 19CF 8E ADC
266 19D0 63 LISU PLOC
267 19D1 68 LISL 0
268 19D2 78 LIS H'8'
269 19D3 50 LR 0,A
270 19D4 28 1B 71 PI SCRL Active and passive pieces
271 19D7 64 LISU KLOC
272 19D8 68 LISL 0
273 19D9 74 LIS H'4'
274 19DA 50 LR 0,A
275 19DB 28 1B 71 PI SCRL
276 19DE 74 LIS H'4'
277 19DF 50 LR 0,A
278 19E0 0E LR Q,DC
279 19E1 2C XDC
280 19E2 0F LR DC,Q
281 19E3 20 E0 LI H'E0' Last 4 bytes come from current RAM
282 19E5 8E ADC
283 19E6 16 JUM8 LM
284 19E7 2C XDC
285 19E8 17 ST
286 19E9 2C XDC
287 19EA 30 DS 0
288 19EB 94 FA BNZ JUM8
289 *Now save the board in anticipation of no double jump
290 19ED 10 JUM9 LR DC,H (Do not yet advance H)
291 19EE 20 10 LI H'10'
292 19F0 8E ADC
293 19F1 28 1B 4B PI SCRA
294 *Now look into double jump situation
295 19F4 42 LR A,2
296 19F5 25 01 CI H'1' Was there a promotion?
297 19F7 94 0C BNZ DOUB No, so may be a double jump
298 19F9 10 LR DC,H Finally ready to advance H
299 19FA 20 10 LI H'10'
300 19FC 8E ADC
301 19FD 11 LR H,DC
302 *We get here from FIND (with H reset) if no continuation possible
303 19FE 47 DOUX LR A,7
304 19FF 18 COM
305 1A00 57 LR 7,A
306 1A01 29 1C 63 JMP FIND
307 1A04 10 DOUB LR DC,H Advance H by 2
308 1A05 20 1C LI H'1C'
309 1A07 8E ADC
310 1A08 43 LR A,3 Needed if continuation is successf
311 1A09 17 ST It will be overwritten if not
312 1A0A 44 LR A,4
313 1A0B 17 ST
314 1A0C 10 LR DC,H
315 1A0D 20 20 LI H'20'
316 1A0F 8E ADC
317 1A10 11 LR H,DC
318 1A11 4B LR A,HL
319 1A12 14 SR 4
320 1A13 2C XDC
321 1A14 2A 0F 00 DCI MOBS
322 1A17 24 FD AI H'FD' stored back by 3
323 1A19 8E ADC Will never be too early
324 1A1A 7F LIS H'F' Used to signal a continuation
325 1A1B 56 LR 6,A
326 1A1C 17 ST Set continuation signal
327 1A1D 2C XDC get back
328 1A1E 28 1B 21 PI RASC Load scratchpad
329 1A21 29 1C 72 JMP RFJ
330 * NORM FORE
331 *Now make normal move
332 1A24 63 NORM LISU PLOC Get back to Active pieces
333 1A25 4C LR A,S LISL still OK
334 1A26 C3 AS 3
335 1A27 5C LR S,A Put in moved piece
336 1A28 42 LR A,2 Was it a king
337 1A29 F2 NS 2
338 1A2A 94 14 BNZ NOM6 Yes so don't promote but do put ki
339 1A2C 45 LR A,5
340 1A2D 21 02 NI H'2' Test for direction
341 1A2F 84 08 BZ NOM4 Black is active
342 1A31 0A LR A,IS
343 1A32 25 30 CI H'30' Did it get to the white king row?
344 1A34 84 08 BZ NOM5 Yes, so promote
345 1A36 90 1E BR FORE
346 1A38 0A NOM4 LR A,IS Black is active
347 1A39 25 33 CI H'33' Did it get to the king row?
348 1A3B 94 19 BNZ FORE No
349 1A3D 71 NOM5 LIS H'1'
350 1A3E 50 LR 0,A
351 1A3F 64 NOM6 LISU KLOC Now get to king byte
352 1A40 4C LR A,S Get corresponding king byte for de
353 1A41 C3 AS 3 Insert king
354 1A42 5C LR S,A And replace byte
355 1A43 40 LR A,0
356 1A44 F0 NS 0
357 1A45 84 0F BZ FORE
358 1A47 6C LISL 4 Now fix the piece debit
359 1A48 4C LR A,S
360 1A49 14 SR 4
361 1A4A 12 SR 1
362 1A4B 1F INC
363 1A4C 25 07 CI H'7'
364 1A4E 81 03 BP NOM7
365 1A50 20 07 LI H'7'
366 1A52 15 NOM7 SL 4
367 1A53 13 SL 1
368 1A54 5C LR S,A
369 1A55 47 FORE LR A,7
370 1A56 18 COM Change color
371 1A57 57 LR 7,A
372 1A58 10 LR DC,H GET back in step
373 * First check HL
374 1A59 4B LR A,HL
375 1A5A 25 10 CI H'10'
376 1A5C 94 78 BNZ FOR3 A machine move
377 * It was a player's move being checked
378 1A5E 28 13 00 PI BORD Show board after move
379 1A61 20 04 LI H'4' "MY MOVE"
380 1A63 50 LR 0,A
381 1A64 28 12 00 PI WMC
382 1A67 2A 0E 20 DCI TRE2
383 1A6A 11 LR H,DC
384 1A6B 28 1B 4B PI SCRA
385 1A6E 10 LR DC,H
386 1A6F 28 1B 21 PI RASC
387 1A72 2A 0C 22 DCI SELX
388 1A75 70 CLR
389 1A76 8C XM
390 1A77 94 51 BNZ FOR2 No book moves stored
391 1A79 2A 0C 22 DCI SELX
392 1A7C 1F INC
393 1A7D 17 ST
394 * Generate two random 1-bit numbers
395 1A7E 62 LISU 2 Get random number
396 1A7F 6D LISL 5
397 1A80 4C LR A,S
398 1A81 21 03 NI H'3' 0 to 3 random number
399 1A83 50 LR 0,A
400 1A84 12 SR 1
401 1A85 51 LR 1,A 0 to 1 random number
402 1A86 40 LR A,0
403 1A87 21 01 NI H'1'
404 1A89 50 LR 0,A 2nd 0 to 1 random number
405 * Machine to make 2nd move from book
406 1A8A 2A 0C 2C DCI BKMV Get stored move munber
407 1A8D 16 LM
408 1A8E 13 SL 1 X2, 2 entries for each input move
409 1A8F C0 AS 0 Random choice between them
410 1A90 2A 1F 66 DCI BOK2 Stored table of book replies
411 1A93 8E ADC
412 1A94 16 LM Get reply number
413 1A95 50 LR 0,A
414 1A96 70 CLR Use second number to select which
415 1A97 E1 XS 1
416 1A98 40 LR A,0
417 1A99 84 02 BZ BMV2
418 1A9B 14 SR 4
419 1A9C 21 07 BMV2 NI H'7'
420 1A9E 50 LR 0,A The final selection
421 1A9F 2A 1A C4 DCI REDM Possible Red moves
422 1AA2 16 BM17 LM Get byte record
423 1AA3 51 LR 1,A
424 1AA4 41 BM18 LR A,1
425 1AA5 F1 NS 1
426 1AA6 94 04 BNZ BM19 Is this byte exhausted?
427 1AA8 16 LM Step over byte info
428 1AA9 90 F8 BR BM17 Go to next byte record
429 1AAB 52 BM19 LR 2,A
430 1AAC 24 FF AI H'FF' Subtract 1
431 1AAE F1 NS 1
432 1AAF 51 LR 1,A byte less rightmost bit
433 1AB0 E2 XS 2 This leaves 1 bit in A
434 1AB1 30 DS 0
435 1AB2 81 F1 BP BM18
436 1AB4 56 LR 6,A Save the byte bit
437 1AB5 16 LM Get the byte info
438 1AB6 54 LR 4,A The byte indicator
439 1AB7 2A 0E 20 DCI TRE2 Machine's board is here
440 1ABA 11 LR H,DC
441 1ABB 7C LIS H'C'
442 1ABC 8E ADC
443 1ABD 46 LR A,6
444 1ABE 17 ST
445 1ABF 44 LR A,4
446 1AC0 17 ST
447 1AC1 29 19 00 JMP SELE
448 *-*-*- Initial moves for red
449 1AC4 07 REDM DC B'00000111' 3 pieces
450 1AC5 0A DC B'00001010' Byte 2, RB
451 1AC6 0F DC B'00001111' 4 pieces
452 1AC7 0B DC B'00001011' Byte 2, LB
453 1AC8 00 DC H'00'
454 *-*-*-
455 * Non-book machine move to follow
456 1AC9 2A 0C 22 FOR2 DCI SELX
457 1ACC 1F INC
458 1ACD 17 ST
459 1ACE 2A 0E 20 DCI TRE2
460 1AD1 11 LR H,DC
461 1AD2 29 1C 63 JMP FIND Normal case so go forward
462 * It was a machine move
463 1AD5 2A 0C 22 FOR3 DCI SELX
464 1AD8 16 LM
465 1AD9 25 01 CI H'1'
466 1ADB 81 15 BP FOR4 It was a randomly chosen book move
467 1ADD 2A 0C 22 DCI SELX
468 1AE0 1F INC
469 1AE1 17 ST
470 * Normal move so go forward
471 1AE2 20 10 LI H'10'
472 1AE4 10 LR DC,H
473 1AE5 8E ADC
474 1AE6 11 LR H,DC
475 1AE7 28 1B 4B PI SCRA
476 1AEA 10 LR DC,H
477 1AEB 28 1B 21 PI RASC
478 1AEE 29 1C 63 JMP FIND
479 * Making a book move so prepare for player's reply
480 1AF1 2A 0C 22 FOR4 DCI SELX
481 1AF4 1F INC
482 1AF5 17 ST
483 1AF6 70 CLR Clear start of PLMV list
484 1AF7 2A 0E D0 DCI PLMV
485 1AFA 17 ST
486 1AFB 2A 0E 30 DCI TRE3
487 1AFE 28 1B 4B PI SCRA Easiest way to handle situation
488 1B01 2A 0E 30 DCI TRE3
489 1B04 2C XDC
490 1B05 2A 0E 10 DCI TREE
491 1B08 20 10 LI H'10'
492 1B0A 62 LISU 2
493 1B0B 68 LISL 0
494 1B0C 5C LR S,A
495 1B0D 28 43 CD PI TRAN
496 1B10 2A 0E 10 DCI TREE
497 1B13 11 LR H,DC
498 1B14 28 1B 21 PI RASC
499 1B17 28 1F 74 PI WAST Waste a few seconds before
500 1B1A 28 13 00 PI BORD displaying the book move
501 1B1D 10 LR DC,H
502 1B1E 29 1C 63 JMP FIND list all possible player's moves
503 * FIND exits to PMOV on finding that HL is H'10'
504 * RASC SCRA FKT GMEN RFJN LFJN STMV
505 *-*-*- RASC RAM to SC transfer
506 1B21 08 RASC LR K,P RAM to SC
507 1B22 28 40 A9 PI PUSH
508 1B25 63 LISU PLOC ←SC buffer with Active and Passive
509 1B26 68 LISL 0
510 1B27 78 LIS H'8'
511 1B28 50 LR 0,A
512 1B29 28 1B 44 PI RASL
513 1B2C 64 LISU KLOC SC buffer with Kings
514 1B2D 68 LISL 0
515 1B2E 74 LIS H'4'
516 1B2F 50 LR 0,A
517 1B30 28 1B 44 PI RASL
518 1B33 20 F1 LI H'F1' Rest of data from earlier block
519 1B35 8E ADC
520 1B36 70 CLR Zero the MOVE byte
521 1B37 5D LR I,A
522 1B38 16 LM
523 1B39 21 E0 NI H'E0' Save Piece debit only
524 1B3B 5D LR I,A
525 1B3C 16 LM
526 1B3D 5D LR I,A Keep both SCORE bytes
527 1B3E 16 LM
528 1B3F 5D LR I,A
529 1B40 28 40 BC PI POPS
530 1B43 0C PK
531 *-*-*-
532 1B44 08 RASL LR K,P
533 1B45 16 RAS2 LM
534 1B46 5D LR I,A
535 1B47 30 DS 0
536 1B48 94 FC BNZ RAS2
537 1B4A 0C PK
538 * SCRA SC to RAM with side reversal
539 1B4B 08 SCRA LR K,P SC to RAM for side reversal
540 1B4C 28 40 A9 PI PUSH
541 1B4F 63 LISU PLOC
542 1B50 6C LISL 4
543 1B51 74 LIS H'4'
544 1B52 50 LR 0,A
545 1B53 28 1B 71 PI SCRL
546 1B56 68 LISL 0
547 1B57 74 LIS H'4'
548 1B58 50 LR 0,A
549 1B59 28 1B 71 PI SCRL
550 1B5C 64 LISU KLOC
551 1B5D 68 LISL 0
552 1B5E 74 LIS H'4'
553 1B5F 50 LR 0,A
554 1B60 28 1B 71 PI SCRL
555 1B63 4D LR A,I To index only
556 1B64 70 CLR Zero MOVE byte
557 1B65 17 ST
558 1B66 4D LR A,I
559 1B67 21 E0 NI H'E0' Save piece debit only
560 1B69 4D LR A,I
561 1B6A 17 ST Save both SCORE bytes
562 1B6B 4D LR A,I
563 1B6C 17 ST
564 1B6D 28 40 BC PI POPS
565 1B70 0C PK
566 *
567 1B71 08 SCRL LR K,P Used by SCRA and SCRD
568 1B72 4D SCR3 LR A,I
569 1B73 17 ST
570 1B74 30 DS 0
571 1B75 94 FC BNZ SCR3
572 1B77 0C PK
573 *-*-*- Test if Kings only can move
574 1B78 08 FKT LR K,P
575 1B79 70 CLR
576 1B7A C7 AS 7
577 1B7B 90 04 BR FK1
578 1B7D 08 BKT LR K,P
579 1B7E 47 LR A,7 Test sides for backward move
580 1B7F 18 COM
581 1B80 84 07 FK1 BZ FK2 NORMAL pieces can move
582 1B82 64 LISU KLOC KINGS only can move
583 1B83 4C LR A,S
584 1B84 F3 NS 3
585 1B85 53 LR 3,A
586 1B86 84 03 BZ FK3 No RF OR LF moves from this byte
587 1B88 43 FK2 LR A,3
588 1B89 F3 NS 3 To set status
589 1B8A 0C FK3 PK
590 *
591 1B8B 08 FJET LR K,P
592 1B8C 71 LIS H'1'
593 1B8D 90 04 BR BJE2
594 1B8F 08 BJET LR K,P
595 1B90 20 FF LI H'FF'
596 1B92 C4 BJE2 AS 4
597 1B93 24 29 AI ISE
598 1B95 0B LR IS,A
599 1B96 4C LR A,S
600 1B97 0C PK
601 *
602 *Subroutine to get byte of ACTIVE pieces
603 1B98 08 GMEN LR K,P
604 1B99 63 LISU PLOC
605 1B9A 68 LISL 0
606 1B9B 0A LR A,IS
607 1B9C C4 AS 4 Add byte #
608 1B9D 0B LR IS,A Get to initial byte
609 1B9E 46 LR A,6
610 1B9F 25 07 CI H'7' Is this an attempted continuation?
611 1BA1 84 07 BZ GME2 Yes, 3 is already set
612 1BA3 25 01 CI H'1' Maybe back up to test for forked c
613 1BA5 84 03 BZ GME2
614 1BA7 4C LR A,S
615 1BA8 53 LR 3,A
616 1BA9 0C GME2 PK
617 *
618 *Subroutine used both by RFJ and RFN
619 1BAA 08 RFJN LR K,P
620 1BAB 4D LR A,I
621 1BAC 15 SL 4
622 1BAD 50 LR 0,A
623 1BAE 4C LR A,S
624 1BAF 14 SR 4
625 1BB0 12 SR 1
626 1BB1 C0 AS 0
627 1BB2 F3 NS 3
628 1BB3 53 LR 3,A The RFJ or RJ byte
629 1BB4 0C PK
630 *
631 *Subroutine used both by LFJ and LFN
632 1BB5 08 LFJN LR K,P
633 1BB6 4D LR A,I
634 1BB7 15 SL 4
635 1BB8 13 SL 1
636 1BB9 50 LR 0,A
637 1BBA 4C LR A,S
638 1BBB 14 SR 4
639 1BBC C0 AS 0
640 1BBD F3 NS 3
641 1BBE 53 LR 3,A The LFJ or LFN byte
642 1BBF 0C PK
643 *
644 *Subroutine used both by LBJ and LBN
645 1BC0 08 LBJN LR K,P
646 1BC1 4E LR A,D
647 1BC2 15 SL 4
648 1BC3 50 LR 0,A
649 1BC4 4C LR A,S
650 1BC5 14 SR 4
651 1BC6 12 SR 1
652 1BC7 C0 AS 0
653 1BC8 F3 NS 3
654 1BC9 53 LR 3,A
655 1BCA 0C PK
656 *
657 *Subroutine used both by RBJ and RBN
658 1BCB 08 RBJN LR K,P
659 1BCC 4E LR A,D
660 1BCD 15 SL 4
661 1BCE 13 SL 1
662 1BCF 50 LR 0,A
663 1BD0 4C LR A,S
664 1BD1 14 SR 4
665 1BD2 C0 AS 0
666 1BD3 F3 NS 3
667 1BD4 53 LR 3,A
668 1BD5 0C PK
669 *Subroutine to add to MOBILITY, and to store MOVE and FLAG bytes i
670 1BD6 08 STMV LR K,P
671 1BD7 64 LISU KLOC
672 1BD8 6C LISL 4 To MOVE byte
673 1BD9 43 LR A,3 GET newly computed MOVE byte
674 1BDA 50 LR 0,A
675 1BDB 28 1F 41 PI CAQ Count its bits
676 1BDE C2 AS 2 Add earlier counts
677 1BDF 52 LR 2,A and store
678 1BE0 4B LR A,HL
679 1BE1 14 SR 4
680 1BE2 25 01 CI H'01' Is this the player's board
681 1BE4 94 19 BNZ STM3 No
682 1BE6 2A 0E D0 DCI PLMV Player's moves stored separately
683 1BE9 16 STM0 LM
684 1BEA 21 FF NI H'FF'
**OPERATOR SYNTAX LINE # 685
685
686 1BEC 84 04 BZ STM1 Find empty space
687 1BEE 16 LM Skip info space
688 1BEF 90 F9 BR STM0 Try again
689 1BF1 20 FF STM1 LI H'FF' Back up
690 1BF3 8E ADC
691 1BF4 43 LR A,3
692 1BF5 17 ST
693 1BF6 44 LR A,4
694 1BF7 13 SL 1
695 1BF8 13 SL 1
696 1BF9 C5 AS 5
697 1BFA 17 ST
698 1BFB 70 CLR
699 1BFC 17 ST Store 0 as stop
700 1BFD 0C PK
701 1BFE 4C STM3 LR A,S Has a move byte been stored?
702 1BFF FC NS S To set status byte
703 1C00 94 0D BNZ STM2 One is already stored
704 1C02 10 LR DC,H Get back in step (may not be neces
705 1C03 7C LIS H'C' To get to MOVE byte
706 1C04 8E ADC
707 1C05 43 STM4 LR A,3
708 1C06 17 ST Store MOVE byte in RAM
709 1C07 5D LR I,A Also put it in SC record as a flag
710 1C08 44 LR A,4 Get the byte pointer
711 1C09 13 SL 1
712 1C0A 13 SL 1
713 1C0B C5 AS 5
714 1C0C 17 ST Put this into RAM
715 1C0D 10 LR DC,H May be necessary
716 1C0E 0C STM2 PK
717 * NEXT FIND RFJ LFJ RBJ LBJ
718 1C0F 70 NEXT CLR
719 1C10 56 LR 6,A Set for normal back up
720 1C11 10 LR DC,H
721 1C12 7D LIS H'D' Get to byte number info
722 1C13 8E ADC
723 1C14 4B LR A,HL Check for multiple jump condition
724 1C15 14 SR 4
725 1C16 24 FD AI H'FD' 1 for start offset, 2 ply's Mobs.
726 1C18 91 18 BM NEX2 Can not be a continuation
727 1C1A 2C XDC Save location
728 1C1B 2A 0F 00 DCI MOBS
729 1C1E 8E ADC
730 1C1F 16 LM
731 1C20 21 07 NI H'7' Is flag set?
732 1C22 2C XDC
733 1C23 84 0D BZ NEX2 No multiple jump
734 *The moving piece byte and byte number is stored in the next earli
735 1C25 2C XDC
736 1C26 10 LR DC,H
737 1C27 20 FC LI H'FC' Back up to get info
738 1C29 8E ADC
739 1C2A 16 LM
740 1C2B 53 LR 3,A The byte with 1 bit on
741 1C2C 16 LM
742 1C2D 54 LR 4,A The byte number
743 1C2E 2C XDC Now back again to the current bloc
744 1C2F 71 LIS H'1' The signal read by GMEN
745 1C30 56 LR 6,A Overwrite previously set value
746 1C31 16 NEX2 LM Get identifying data
747 1C32 50 LR 0,A Save temporarily
748 1C33 21 0F NI H'F' Leave J bit and other data off
749 1C35 25 0F CI H'F' Is this the last move byte?
750 1C37 84 1C BZ NEX5 Yes
751 1C39 40 LR A,0
752 1C3A 1F INC To next direction
753 1C3B 50 LR 0,A
754 1C3C 12 SR 1
755 1C3D 12 SR 1
756 1C3E 21 03 NI 3
757 1C40 54 LR 4,A Save byte number
758 1C41 40 LR A,0 Now get the direction
759 1C42 21 03 NI 3 Separate out desired data
760 1C44 55 LR 5,A And save (it will be a 1, 2, or 3
761 1C45 40 LR A,0
762 1C46 21 10 NI H'10' Check jump bit
763 1C48 94 0E BNZ NEX4 A jump move
764 1C4A 45 LR A,5
765 1C4B F5 NS 5
766 1C4C 84 04 BZ NEX3
767 1C4E 29 1D FC JMP RBN0 A normal move, decide on 1, 2, or
768 1C51 29 1D C4 NEX3 JMP RFN It was 0
769 1C54 29 1D 7F NEX5 JMP AFT
770 1C57 45 NEX4 LR A,5
771 1C58 F5 NS 5
772 1C59 84 18 BZ RFJ It was a 0
773 1C5B 25 02 CI H'2' Which direction, 1, 2, or 3?
774 1C5D 91 7E BM LBJ It was a 3
775 1C5F 94 33 BNZ LFJ It was a 1
776 1C61 90 59 BR RBJ It was a 2
777 *We enter here on going forward
778 1C63 10 FIND LR DC,H
779 1C64 28 1B 21 PI RASC
780 1C67 28 1F 1C PI EMPT Compute the empty squares
781 1C6A 63 LISU PLOC
782 1C6B 68 LISL 0 Start with byte 0
783 1C6C 70 CLR
784 1C6D 54 LR 4,A Used to distinguish byte
785 1C6E 52 LR 2,A Used to accumulate mobility count
786 1C6F 20 FF LI H'FF'
787 1C71 56 LR 6,A So all moves will be found
788 1C72 28 1B 98 RFJ PI GMEN
789 1C75 28 1B 78 PI FKT Are there forward moving pieces?
790 1C78 28 1B 8B PI FJET Are jump moves in this direction p
791 1C7B 12 SR 1
792 1C7C 21 77 NI H'77' Save 6 particular bits only
793 1C7E F3 NS 3
794 1C7F 53 LR 3,A Only pieces that have place to lan
795 1C80 0A LR A,IS
796 1C81 C4 AS 4
797 1C82 0B LR IS,A
798 1C83 28 1B AA PI RFJN This returns the RFJ byte in 3 and
799 1C86 84 0C BZ LFJ
800 1C88 20 10 LI H'10' The RFJ direction and J indicator
801 1C8A 55 LR 5,A
802 1C8B 28 1B D6 PI STMV Store MOVE and FLAG if MOVE found
803 1C8E 46 LR A,6
804 1C8F 23 FF XI H'FF'
805 1C91 94 66 BNZ JUMF
806 1C93 28 1B 98 LFJ PI GMEN
807 1C96 28 1B 78 PI FKT
808 1C99 28 1B 8B PI FJET Are jump moves in this direction p
809 1C9C 13 SL 1
810 1C9D 21 EE NI H'EE' Save 6 particular bits only
811 1C9F F3 NS 3
812 1CA0 53 LR 3,A Only pieces that have a place to l
813 1CA1 0A LR A,IS
814 1CA2 C4 AS 4
815 1CA3 0B LR IS,A
816 1CA4 28 1B B5 PI LFJN This returns the LFJ byte in 3
817 1CA7 84 13 BZ RBJ
818 1CA9 20 11 LI H'11' The LFJ direction and J indicator
819 1CAB 55 LR 5,A
820 1CAC 28 1B D6 PI STMV
821 1CAF 46 LR A,6
822 1CB0 23 FF XI H'FF'
823 1CB2 94 45 BNZ JUMF
824 1CB4 45 RBJ0 LR A,5
825 1CB5 25 02 CI H'2' Which direction, 1, 2, or 3?
826 1CB7 91 24 BM LBJ It was a 3
827 1CB9 94 D9 BNZ LFJ It was a 1
828 1CBB 28 1B 98 RBJ PI GMEN
829 1CBE 28 1B 7D PI BKT
830 1CC1 28 1B 8F PI BJET
831 1CC4 12 SR 1
832 1CC5 21 77 NI H'77' Save 6 particular bits only
833 1CC7 F3 NS 3
834 1CC8 53 LR 3,A
835 1CC9 0A LR A,IS
836 1CCA C4 AS 4
837 1CCB 0B LR IS,A
838 1CCC 28 1B CB PI RBJN This returns the RBJ byte in 3
839 1CCF 84 0C BZ LBJ
840 1CD1 20 12 LI H'12' The RBJ direction and J indicator
841 1CD3 55 LR 5,A
842 1CD4 28 1B D6 PI STMV
843 1CD7 46 LR A,6
844 1CD8 23 FF XI H'FF'
845 1CDA 94 1D BNZ JUMF
846 1CDC 28 1B 98 LBJ PI GMEN
847 1CDF 28 1B 7D PI BKT
848 1CE2 28 1B 8F PI BJET
849 1CE5 13 SL 1
850 1CE6 21 EE NI H'EE' Save 6 particular bits only
851 1CE8 F3 NS 3
852 1CE9 53 LR 3,A
853 1CEA 0A LR A,IS
854 1CEB C4 AS 4
855 1CEC 0B LR IS,A
856 1CED 28 1B C0 PI LBJN This returns the RBJ byte in 3
857 1CF0 84 17 BZ JUMT
858 1CF2 20 13 LI H'13' The RBJ direction and J indicator
859 1CF4 55 LR 5,A
860 1CF5 28 1B D6 PI STMV
861 1CF8 4B JUMF LR A,HL Where are we?
862 1CF9 14 SR 4 To get the ply
863 1CFA 25 01 CI H'1' Remember offset
864 1CFC 94 04 BNZ JUMD Checking for possible player's mov
865 1CFE 29 11 00 JMP PMOV Yes, so let him move
866 1D01 25 0F JUMD CI H'F' Are we out of space? (next block c
867 1D03 84 C0 BZ RFN To compute non-jump mobility and s
868 1D05 29 19 00 JMP SELE
869 * JUMT AFTC
870 *
871 *No move found from this byte so see if there are more bytes
872 1D08 46 JUMT LR A,6
873 *Are we backing up and then trying to find yet another continuatio
874 1D09 25 01 CI H'1' Are we backing up to a possible fo
875 1D0B 84 1E BZ AFTC Yes so something special is requir
876 1D0D 25 07 CI H'7' Were we trying to find a continuat
877 1D0F 94 09 BNZ JUMM No
878 1D11 10 LR DC,H There was no continuation
879 1D12 20 F0 LI H'F0' Back up
880 1D14 8E ADC
881 1D15 11 LR H,DC
882 1D16 29 19 FE JMP DOUX This changes the color and proceed
883 1D19 44 JUMM LR A,4
884 1D1A 1F INC
885 1D1B 21 03 NI H'3'
886 1D1D 54 LR 4,A
887 1D1E 94 53 BNZ RFJ Go round again for next byte
888 1D20 46 LR A,6
889 1D21 23 FF XI H'FF'
890 1D23 70 CLR
891 1D24 54 LR 4,A Prepare to start over on the first
892 1D25 84 9E BZ RFN Maybe there are normal moves
893 1D27 29 1D 7F JMP AFT A jump was demanded so back up
894 *We compare the score with that 2 blocks earlier and back it up if
895 *and then back to this level in any case
896 1D2A 10 AFTC LR DC,H We are here
897 1D2B 7E LIS H'E' Get score values
898 1D2C 8E ADC
899 1D2D 16 LM
900 1D2E 50 LR 0,A Save them to complare
901 1D2F 16 LM
902 1D30 51 LR 1,A
903 1D31 20 D0 LI H'D0' Actually backing only 2
904 1D33 8E ADC
905 1D34 11 LR H,DC We back up always
906 1D35 7E LIS H'E' Get to score location
907 1D36 8E ADC
908 1D37 40 LR A,0 Now compare score
909 1D38 8D CM
910 1D39 91 07 BM AFT2 Back score for sure
911 1D3B 94 40 BNZ AFT5 Do not back score
912 1D3D 41 LR A,1 A further comparison is necessary
913 1D3E 8D CM
914 1D3F 81 3C BP AFT5 Do not back after all
915 1D41 10 AFT2 LR DC,H Resetting is easier
916 1D42 7E LIS H'E'
917 1D43 8E ADC
918 1D44 40 LR A,0 Back up the score
919 1D45 17 ST
920 1D46 41 LR A,1
921 1D47 17 ST
922 1D48 4B LR A,HL Where are we?
923 1D49 14 SR 4
924 1D4A 25 03 CI H'3' Do we need to save board as possib
925 1D4C 94 2F BNZ AFT5 No, at some other level in the tre
926 1D4E 40 LR A,0 Invert score for compaarison
927 1D4F 18 COM
928 1D50 1F INC
929 1D51 50 LR 0,A
930 1D52 41 LR A,1 Invert score
931 1D53 18 COM
932 1D54 1F INC
933 1D55 51 LR 1,A
934 1D56 10 LR DC,H
935 1D57 20 FE LI H'FE' Back to earlies score
936 1D59 8E ADC
937 1D5A 40 LR A,0
938 1D5B 8D CM
939 1D5C 91 07 BM AFT3 Board should be saved
940 1D5E 94 1D BNZ AFT5 It should not be saved
941 1D60 41 LR A,1
942 1D61 8D CM
943 1D62 81 19 BP AFT5 Don't save after all
944 *Special treatment is necessary to prevent the saving of the
945 *intermediate board position of the multiple jump at a later time
946 *We do this by backing the score now
947 1D64 10 AFT3 LR DC,H
948 1D65 20 FE LI H'FE'
949 1D67 8E ADC
950 1D68 40 LR A,0 First back score now
951 1D69 17 ST
952 1D6A 41 LR A,1
953 1D6B 17 ST
954 1D6C 2A 0E 10 DCI TREE Location to save board
955 1D6F 2C XDC
956 *NOTE: This is fixed for a double jump but some additional code
957 *may still needed for a triple jump!
958 1D70 10 LR DC,H
959 1D71 20 10 LI H'10' Double jump resulting board
960 1D73 8E ADC
961 1D74 50 LR 0,A Counter
962 1D75 16 AFT4 LM Now save the board
963 1D76 2C XDC
964 1D77 17 ST
965 1D78 2C XDC
966 1D79 30 DS 0
967 1D7A 94 FA BNZ AFT4
968 1D7C 29 19 00 AFT5 JMP SELE
969 * AFT MAKE RFN LFN RBN LBN NORT NORF NOR2 NOR3 NOR4
970 *No moves found so time to back up
971 1D7F 10 AFT LR DC,H
972 1D80 7E LIS H'E' Get to SCORE
973 1D81 8E ADC
974 1D82 16 LM
975 1D83 50 LR 0,A The current material advantage ter
976 1D84 16 LM
977 1D85 56 LR 6,A The current positional term
978 1D86 4B LR A,HL Where are we?
979 1D87 14 SR 4
980 1D88 25 02 CI H'2'
981 1D8A 84 0F BZ MAKE Time to report move
982 1D8C 25 03 CI H'3' Room to alpha-beta prune?
983 1D8E 81 08 BP AFTX No
984 1D90 10 LR DC,H
985 1D91 20 EE LI H'EE' The score for 2 boards earlier
986 1D93 8E ADC
987 1D94 29 1E CC JMP EV4A
988 1D97 29 1E DA AFTX JMP EVA5
989 *
990 *Prepare for analysis of player's reply
991 1D9A 2A 0E 10 MAKE DCI TREE Get to players board
992 1D9D 11 LR H,DC
993 1D9E 2C XDC Now clear space for possible playe
994 1D9F 2A 0E D0 DCI PLMV This space is also used by TREE ro
995 1DA2 7F LIS H'F'
996 1DA3 50 LR 0,A
997 1DA4 70 CLR
998 1DA5 17 ST
999 1DA6 30 DS 0
1000 1DA7 81 FD BP *-2
1001 1DA9 2C XDC
1002 1DAA 29 1C 63 JMP FIND
1003 *Subroutine to save players possible moves
1004 * THIS MAY NOT BE NEEDED
1005 1DAD 08 SVPM LR K,P
1006 1DAE 2C XDC So we can get back
1007 1DAF 45 LR A,5
1008 1DB0 21 10 NI H'10'
1009 1DB2 2A 0E E0 DCI PLMF Players jump move flag
1010 1DB5 17 ST
1011 1DB6 44 LR A,4
1012 1DB7 13 SL 1
1013 1DB8 13 SL 1
1014 1DB9 C5 AS 5
1015 1DBA 21 0F NI H'F' Save only last 4 bits
1016 1DBC 2A 0E D0 DCI PLMV This area may be overwritten by tr
1017 1DBF 8E ADC
1018 1DC0 43 LR A,3
1019 1DC1 17 ST
1020 1DC2 2C XDC
1021 1DC3 0C PK
1022 *
1023 1DC4 28 1B 98 RFN PI GMEN
1024 1DC7 28 1B 78 PI FKT
1025 1DCA 84 38 BZ RBN
1026 1DCC 44 LR A,4 Get byte number
1027 1DCD 24 29 AI ISE Start of empty region
1028 1DCF 0B LR IS,A
1029 1DD0 28 1B AA PI RFJN
1030 1DD3 84 0B BZ LFN
1031 1DD5 70 CLR
1032 1DD6 55 LR 5,A
1033 1DD7 28 1B D6 PI STMV
1034 1DDA 46 LR A,6
1035 1DDB 23 FF XI H'FF'
1036 1DDD 94 5B BNZ NORF
1037 1DDF 28 1B 98 LFN PI GMEN
1038 1DE2 28 1B 78 PI FKT
1039 1DE5 84 1D BZ RBN
1040 1DE7 44 LR A,4 Get byte number
1041 1DE8 24 29 AI ISE Start of empty region
1042 1DEA 0B LR IS,A
1043 1DEB 28 1B B5 PI LFJN
1044 1DEE 84 14 BZ RBN
1045 1DF0 71 LIS H'1'
1046 1DF1 55 LR 5,A
1047 1DF2 28 1B D6 PI STMV
1048 1DF5 46 LR A,6
1049 1DF6 23 FF XI H'FF'
1050 1DF8 94 40 BNZ NORF
1051 1DFA 90 08 BR RBN
1052 1DFC 45 RBN0 LR A,5
1053 1DFD 25 02 CI H'2' Which direction, 1, 2, or 3?
1054 1DFF 91 1E BM LBN It was a 3
1055 1E01 94 DD BNZ LFN It was a 1
1056 1E03 28 1B 98 RBN PI GMEN
1057 1E06 28 1B 7D PI BKT
1058 1E09 84 32 BZ NORT
1059 1E0B 44 LR A,4 Get byte number
1060 1E0C 24 29 AI ISE Start of empty region
1061 1E0E 0B LR IS,A
1062 1E0F 28 1B CB PI RBJN
1063 1E12 84 29 BZ NORT
1064 1E14 72 LIS H'2'
1065 1E15 55 LR 5,A
1066 1E16 28 1B D6 PI STMV
1067 1E19 46 LR A,6
1068 1E1A 23 FF XI H'FF'
1069 1E1C 94 1C BNZ NORF
1070 1E1E 28 1B 98 LBN PI GMEN
1071 1E21 28 1B 7D PI BKT
1072 1E24 84 17 BZ NORT
1073 1E26 44 LR A,4 Get byte number
1074 1E27 24 29 AI ISE Start of empty region
1075 1E29 0B LR IS,A
1076 1E2A 28 1B C0 PI LBJN
1077 1E2D 84 0E BZ NORT
1078 1E2F 73 LIS H'3'
1079 1E30 55 LR 5,A
1080 1E31 28 1B D6 PI STMV
1081 1E34 46 LR A,6
1082 1E35 23 FF XI H'FF'
1083 1E37 84 04 BZ NORT
1084 1E39 29 19 00 NORF JMP SELE
1085 *We get here if we want to compute mobility and also if no moves f
1086 1E3C 44 NORT LR A,4
1087 1E3D 1F INC
1088 1E3E 21 03 NI H'3'
1089 1E40 54 LR 4,A
1090 1E41 94 82 BNZ RFN Go round again for next byte
1091 1E43 42 LR A,2 Get mobility count
1092 1E44 F2 NS 2
1093 1E45 94 04 BNZ NOR1
1094 1E47 29 1D 7F JMP AFT Woops! no move found
1095 1E4A 4B NOR1 LR A,HL Where are we?
1096 1E4B 14 SR 4 Get Ply number
1097 1E4C 24 FF AI H'FF'
1098 1E4E 53 LR 3,A We'll be needing this again soon
1099 1E4F 94 04 BNZ NOR2 Checking for possible player's mov
1100 1E51 29 11 00 JMP PMOV Yes, so let him move
1101 1E54 2A 0C 20 NOR2 DCI PLY0 Player's choice of ply
1102 1E57 8D CM
1103 1E58 10 LR DC,H Reset DC
1104 1E59 91 0C BM NOR3 Stop for sure
1105 1E5B 94 0D BNZ NOR4 Go on in this case
1106 1E5D 20 F5 LI H'F5' Decision based on previous move
1107 1E5F 8E ADC
1108 1E60 16 LM
1109 1E61 21 10 NI H'10' Test jump flag
1110 1E63 10 LR DC,H
1111 1E64 94 04 BNZ NOR4 Go on if previous move was a jump
1112 1E66 29 1E 7D NOR3 JMP EVAL
1113 1E69 43 NOR4 LR A,3
1114 1E6A 24 FD NOR5 AI H'FD' To save space so MOBS will not ove
1115 1E6C 91 0D BM NOR7 Don't save mobility for early plys
1116 1E6E 2A 0F 00 DCI MOBS
1117 1E71 8E ADC
1118 1E72 42 LR A,2
1119 1E73 25 0F CI H'F' Limit mobility to 15 so it will pa
1120 1E75 81 02 BP NOR6
1121 1E77 7F LIS H'F'
1122 1E78 15 NOR6 SL 4 Reserve right half for Multiple ju
1123 1E79 17 ST Save mobility in MOBS space indexe
1124 1E7A 29 19 00 NOR7 JMP SELE
1125 * EVAL
1126 1E7D 4B EVAL LR A,HL We'll need the ply value
1127 1E7E 14 SR 4
1128 1E7F 24 FF AI H'FF'
1129 1E81 55 LR 5,A We'll need it again
1130 1E82 24 FD AI H'FD' MOBS indexes 2 less and we want on
1131 1E84 10 LR DC,H
1132 1E85 8E ADC
1133 1E86 16 LM Get earlier mobility
1134 1E87 14 SR 4 It was shifted to pack
1135 1E88 18 COM
1136 1E89 1F INC
1137 1E8A C2 AS 2 Add current mobility
1138 1E8B 25 07 CI H'7' Difference limited to absolute 7
1139 1E8D 81 03 BP EVAA
1140 1E8F 20 07 LI H'7'
1141 1E91 25 F9 EVAA CI H'F9'
1142 1E93 91 03 BM EVAB
1143 1E95 20 F9 LI H'F9'
1144 1E97 15 EVAB SL 4 Make room for ply term
1145 1E98 56 LR 6,A Save difference (and free 2)
1146 *Now look to the first term
1147 1E99 10 LR DC,H Make sure this is correct
1148 1E9A 7C LIS H'C' To get current board piece debit
1149 1E9B 8E ADC
1150 1E9C 64 LISU KLOC
1151 1E9D 6D LISL 5 To get previous board piece debit
1152 1E9E 4D LR A,I
1153 1E9F 14 SR 4
1154 1EA0 12 SR 1
1155 1EA1 52 LR 2,A Piece credit for ACTIVE
1156 1EA2 16 LM Now the current board
1157 1EA3 14 SR 4
1158 1EA4 12 SR 1
1159 1EA5 51 LR 1,A Piece credit for PASSIVE
1160 1EA6 50 LR 0,A Save it twice
1161 1EA7 18 COM
1162 1EA8 1F INC Make it a true negation
1163 1EA9 C2 AS 2
1164 1EAA 54 LR 4,A Save for its sign
1165 1EAB 84 5E BZ EVA7 No material advantage
1166 1EAD 81 06 BP EVA2
1167 1EAF 18 COM
1168 1EB0 1F INC Make it a true negation
1169 1EB1 51 LR 1,A
1170 1EB2 40 LR A,0 This was the larger
1171 1EB3 52 LR 2,A
1172 1EB4 42 EVA2 LR A,2
1173 1EB5 24 02 AI 2 Increase larger by 2
1174 1EB7 52 LR 2,A
1175 1EB8 28 1F 52 PI MPYR Multiply 2 by 1
1176 1EBB 44 LR A,4
1177 1EBC F4 NS 4
1178 1EBD 81 08 BP EVA3
1179 1EBF 40 LR A,0
1180 1EC0 18 COM Note not true negation
1181 1EC1 1F INC
**OPERATOR SYNTAX LINE # 1182
1182
1183 1EC2 50 LR 0,A The Piece score
1184 1EC3 45 LR A,5
1185 1EC4 90 04 BR EVA4
1186 1EC6 45 EVA3 LR A,5
1187 1EC7 18 COM
1188 1EC8 1F INC
1189 1EC9 C6 EVA4 AS 6 Add in the mobility term
1190 1ECA 56 LR 6,A Completed positional term
1191 1ECB 45 LR A,5
1192 1ECC 25 02 EV4A CI H'2' Are we far enough along to be able
1193 1ECE 81 0B BP EVA5 No
1194 1ED0 40 EV4B LR A,0 Now get material advantage term ba
1195 1ED1 8D CM Compare with value brought forward
1196 1ED2 91 07 BM EVA5 Can not alphe-beta prune
1197 1ED4 94 3F BNZ EVA9 In this case we can for sure
1198 *We have to compare second score terms in this case
1199 1ED6 46 LR A,6
1200 1ED7 8D CM
1201 1ED8 81 3B BP EVA9 We can prune
1202 1EDA 10 EVA5 LR DC,H Otherwise back 1 level
1203 1EDB 20 F0 LI H'F0'
1204 1EDD 8E ADC
1205 1EDE 11 LR H,DC
1206 1EDF 7E LIS H'E'
1207 1EE0 8E ADC
1208 1EE1 40 LR A,0
1209 1EE2 18 COM
1210 1EE3 1F INC
1211 1EE4 8D CM
1212 1EE5 91 09 BM EVA6 Back score for sure
1213 1EE7 94 29 BNZ EVA8 Do not back score for sure
1214 1EE9 46 LR A,6
1215 1EEA 18 COM
1216 1EEB 1F INC
1217 1EEC 8D CM
1218 1EED 81 23 BP EVA8 Do not back score
1219 1EEF 10 EVA6 LR DC,H
1220 1EF0 7E LIS H'E'
1221 1EF1 8E ADC Get back to first score term
1222 1EF2 40 LR A,0
1223 1EF3 18 COM
1224 1EF4 1F INC
1225 1EF5 17 ST
1226 1EF6 46 LR A,6
1227 1EF7 18 COM
1228 1EF8 1F INC
1229 1EF9 17 ST
1230 1EFA 45 LR A,5 Where are we?
1231 1EFB 25 01 CI H'1' (5 has already been decremented)
1232 1EFD 94 13 BNZ EVA8 Not going back to the first board
1233 1EFF 10 LR DC,H
1234 1F00 20 F0 LI H'F0'
1235 1F02 8E ADC
1236 1F03 2C XDC
1237 1F04 20 20 LI H'20'
1238 1F06 8E ADC
1239 1F07 20 10 LI H'10' Prepare to save this board
1240 1F09 50 LR 0,A
1241 1F0A 16 EVA7 LM
1242 1F0B 2C XDC
1243 1F0C 17 ST
1244 1F0D 2C XDC
1245 1F0E 30 DS 0
1246 1F0F 94 FA BNZ EVA7
1247 1F11 29 19 00 EVA8 JMP SELE
1248 1F14 10 EVA9 LR DC,H
1249 1F15 20 E0 LI H'E0' Back 2
1250 1F17 8E ADC
1251 1F18 11 LR H,DC
1252 1F19 29 19 00 JMP SELE
1253 * EMPT CAQ MPYR
1254 1F1C 08 EMPT LR K,P Empty squares in O'51' thru O'54'
1255 1F1D 65 LISU ELOC with guard bytes in 50 and 55
1256 1F1E 68 LISL 0
1257 1F1F 70 CLR
1258 1F20 5C LR S,A Make sure guard byte is empty
1259 1F21 63 LISU PLOC Start with ACTIVE
1260 1F22 74 LIS H'4'
1261 1F23 50 LR 0,A
1262 1F24 90 05 BR EMP3
1263 1F26 0A EMP2 LR A,IS
1264 1F27 24 30 AI H'30' Actually subtracting 16
1265 1F29 0B LR IS,A
1266 1F2A 4C EMP3 LR A,S
1267 1F2B 51 LR 1,A
1268 1F2C 0A LR A,IS
1269 1F2D 24 04 AI 4
1270 1F2F 0B LR IS,A
1271 1F30 4C LR A,S
1272 1F31 C1 AS 1
1273 1F32 51 LR 1,A
1274 1F33 0A LR A,IS
1275 1F34 24 0D AI H'D' Add 13 get to the correct EMPTY lo
1276 1F36 0B LR IS,A
1277 1F37 41 LR A,1
1278 1F38 18 COM Reverse 1's and 0's
1279 1F39 5C LR S,A
1280 1F3A 30 DS 0
1281 1F3B 94 EA BNZ EMP2
1282 1F3D 4D LR A,I To index only
1283 1F3E 70 CLR
1284 1F3F 5C LR S,A Upper guard byte
1285 1F40 0C PK
1286 *-*-*-*-*-*-*-*-*-*
1287 1F41 08 CAQ LR K,P To count bits in R0
1288 1F42 70 CLR Uses R1
1289 1F43 51 LR 1,A
1290 1F44 40 LR A,0
1291 1F45 90 06 BR CAQ3
1292 1F47 31 CAQ2 DS 1
1293 1F48 24 FF AI H'FF'
1294 1F4A F0 NS 0
1295 1F4B 50 LR 0,A
1296 1F4C 94 FA CAQ3 BNZ CAQ2
1297 1F4E 41 LR A,1
1298 1F4F 18 COM
1299 1F50 1F INC Make it into a true positive number
1300 1F51 0C PK
1301 *-*-*-*-*-*-*-*-*-*-
1302 1F52 08 MPYR LR K,P Multiplies larger pos. number in 2
1303 1F53 70 CLR by smaller pos. # in 1
1304 1F54 50 LR 0,A Product into 0
1305 1F55 41 LR A,1
1306 1F56 21 01 MPY1 NI H'1' Is the rightmost bit a 1?
1307 1F58 84 04 BZ MPY2 No
1308 1F5A 42 LR A,2
1309 1F5B C0 AS 0
1310 1F5C 50 LR 0,A
1311 1F5D 42 MPY2 LR A,2
1312 1F5E 13 SL 1
1313 1F5F 52 LR 2,A
1314 1F60 41 LR A,1
1315 1F61 12 SR 1
1316 1F62 51 LR 1,A
1317 1F63 94 F2 BNZ MPY1 Product is not complete
1318 1F65 0C PK
1319 *-*-*-
1320 *First replies (maximum of 4 each)
1321 1F66 33 BOK2 DC H'33' 24,20 24-20 To 12-16
1322 1F67 33 DC H'33' 24-20, 24-20
1323 1F68 43 DC H'43' 23-19, 24-20 To 11-15
1324 1F69 20 DC H'20' 22-17, 24-19
1325 1F6A 22 DC H'22' 22-17, 22-17 To 10-14
1326 1F6B 22 DC H'22' 22-17, 22-17
1327 1F6C 55 DC H'55' 22-18, 22-18 To 9-13
1328 1F6D 55 DC H'55' 22-18, 22-18
1329 1F6E 31 DC H'31' 24-20, 23-18 To 11-16
1330 1F6F 45 DC H'45' 24-19, 22-18
1331 1F70 66 DC H'66' 21-17, 21-17 To 10-15
1332 1F71 66 DC H'66' 21-17, 21-17
1333 1F72 55 DC H'55' 22-18, 22-18 To 9-14
1334 1F73 55 DC H'55' 22-18, 22-18
1335 *-*-*-
1336 1F74 08 WAST LR K,P Delay loop to WASTE some time
1337 1F75 7A LIS H'A' Should be about 7.5 sec.
1338 1F76 50 LR 0,A
1339 1F77 70 WAS2 CLR
1340 1F78 51 LR 1,A
1341 1F79 70 WAS3 CLR
1342 1F7A 52 LR 2,A
1343 1F7B 32 WAS4 DS 2
1344 1F7C 94 FE BNZ WAS4
1345 1F7E 31 DS 1
1346 1F7F 94 F9 BNZ WAS3
1347 1F81 30 DS 0
1348 1F82 94 F4 BNZ WAS2
1349 1F84 0C PK
1350 *
END
NUMBER OF ERRORS= 4
1
J =0009 VY =0004 VX =0003 HU =000A HL =000B Y =0002
X =0001 ISA =0018 EVAA 1E91 EVAB 1E97 EVAL 1E7D TRAN =43CD
UDAT =424D HSAV =0E59 EVA2 1EB4 EVA3 1EC6 EVA4 1EC9 EVA5 1EDA
EVA6 1EEF EVA7 1F0A EVA8 1F11 EVA9 1F14 MOBS =0F00 WMC =1200
TXC =0FE8 SHCB =0FE2 REDM 1AC4 ISE =0029 TREE =0E10 GMEN 1B98
CLER =4762 BJET 1B8F FJET 1B8B ISE0 =0028 BJE2 1B92 TRE2 =0E20
GME2 1BA9 TRE3 =0E30 WDG =4105 UPI =0FFA ULIN =00F5 WAIT =4501
LFJ 1C93 LBJ 1CDC RBJ 1CBB RFJ 1C72 LFJN 1BB5 LBJN 1BC0
RFJN 1BAA RBJN 1BCB OBJ0 =0C30 RBJ0 1CB4 OBJ1 =0F10 ISK =0020
MAKE 1D9A BOK2 1F66 SHL =27C6 DELE 1922 SELE 1900 BFLG =0C27
INLH 1938 WTLN =0FE5 YBLN =0C2A XBLN =0C29 SELX =0C22 COL0 =0C21
DEL2 1932 INL2 1941 INL3 1947 SEL3 190D SEL4 1918 COM =08F7
JUMD 1D01 PLMD =0E5B BCMD =006D TCMD =0044 JUMF 1CF8 PLMF =0EE0
JUMM 1D19 JUMP 1966 TEMP =0008 JUMT 1D08 PLMV =0ED0 BKMV =0C2C
STMV 1BD6 STM0 1BE9 JUM1 196F STM1 1BF1 JUM2 1988 STM2 1C0E
JUM3 198A STM3 1BFE JUM4 199F NOM4 1A38 STM4 1C05 JUM5 19AD
NOM5 1A3D JUM6 19B2 NOM6 1A3F JUM7 19B9 NOM7 1A52 JUM8 19E6
JUM9 19ED LFN 1DDF LBN 1E1E RBN 1E03 RFN 1DC4 DBNC =0FEB
FIND 1C63 LINE =0FDF BLNF =0C28 BCNT =0C2B RBN0 1DFC ELOC =0005
KLOC =0004 PLOC =0003 TCOL =0080 YPOS =0C26 XPOS =0C23 PMOV =1100
XZOZ =0034 ISP =001C INPF =0FE3 SVPM 1DAD POPS =40BC EMPT 1F1C
EMP2 1F26 EMP3 1F2A CAQ 1F41 CAQ2 1F47 CAQ3 1F4C TIR =45DB
SHR =27D3 SCRA 1B4B BORD =1300 FORE 1A55 NORF 1E39 CMRG =0FEA
INRH 1949 SCRL 1B71 NORM 1A24 NORT 1E3C NOR1 1E4A INR2 1954
NOR2 1E54 FOR2 1AC9 NOR3 1E66 SCR3 1B72 FOR3 1AD5 NOR4 1E69
FOR4 1AF1 NOR5 1E6A NOR6 1E78 NOR7 1E7A WMS =4205 CDS =41D5
IJS =22DB SPS =40D0 FCS =43D6 RASC 1B21 PUSH =40A9 RASL 1B44
WAST 1F74 YTST =0009 WAS2 1F77 RAS2 1B45 WAS3 1F79 WAS4 1F7B
CHT =0003 BKT 1B7D AFT 1D7F FKT 1B78 AFTC 1D2A BOTH 195A
AFTX 1D97 BOT1 1963 AFT2 1D41 AFT3 1D64 AFT4 1D75 AFT5 1D7C
DOUB 1A04 WAUD =41C8 DOUX 19FE WAU1 =41CC BMV2 1A9C NEXT 1C0F
MAXY =004D NEX2 1C31 NEX3 1C51 NEX4 1C57 NEX5 1C54 PLYD =00FD
PLYH =00FC JOYI =21AD MPYR 1F52 JOYT =0C00 PLYT =00FE PLY0 =0C20
MPY1 1F56 MPY2 1F5D FK1 1B80 BM17 1AA2 BM18 1AA4 BM19 1AAB
FK2 1B88 FK3 1B8A EV4A 1ECC EV4B 1ED0 JU7M 19C4